﻿using System;
using System.Diagnostics;

namespace XchangeStreamer.CacheServer
{
    class Program
    {
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            using (CacheServer.Core.Server server = CacheServer.Core.Server.Instance)
            {
                Console.WriteLine("The market data feed CacheServer service is available.");
                Console.ReadKey(true);
            }
            Console.WriteLine("The market data feed CacheServer service is not available.");
        }

        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Console.WriteLine("Exception Message: {0}", e.ExceptionObject.ToString());
        }

    }
}
